<template>
  <div>
    <p>国内的体育</p>
    <div>
        <button @click="change">切换</button>
    </div>
    <router-link to="/sport/guonei/games"></router-link>
    <router-link to="/sport/guonei/lanqiu"></router-link>
    <router-link to="/sport/guonei/run"></router-link>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
data() {
    return {
        path:[
            '/sport/guonei/games',
            '/sport/guonei/lanqiu',
            '/sport/guonei/run'
        ]
    }
},
methods: {
    change() {
        this.$router.push(this.path[Math.floor(Math.random()*3)])
    }
}
}
</script>

<style>

</style>